<html>
<head><meta charset="utf-8"><title>Removing old const checker/qualifier · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html">Removing old const checker/qualifier</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="179196885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179196885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179196885">(Oct 28 2019 at 02:03)</a>:</h4>
<p>A patched version of the new dataflow-based const validator finally got a crater run in  <a href="https://github.com/rust-lang/rust/issues/65829" target="_blank" title="https://github.com/rust-lang/rust/issues/65829">#65829</a> with three regressions, all of which seem spurious (to me at least <span aria-label="smile" class="emoji emoji-263a" role="img" title="smile">:smile:</span>). <a href="https://github.com/rust-lang/rust/issues/63812" target="_blank" title="https://github.com/rust-lang/rust/issues/63812">#63812</a>, which computes the promotability of temps was only recently merged on nightly but has already had a crater run with no regressions.</p>
<p>Currently, both are run in parallel with the pass they are intended to replace, and any mismatch in their output causes a compiler error. At what point are we comfortable with tearing out the old pass in <code>qualify_consts</code> that does everything <span class="user-group-mention" data-user-group-id="492">@T-compiler</span>?</p>



<a name="179197011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179197011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179197011">(Oct 28 2019 at 02:07)</a>:</h4>
<p>I think we probably want to run the new promotability analysis on nightly for a week or two, but it seems pretty low risk to me.</p>



<a name="179215849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179215849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179215849">(Oct 28 2019 at 09:49)</a>:</h4>
<p>I think we can start drafting a PR for removing the old promotion stuff but keeping the two const-checkers, mostly to see just how much we can clean up</p>



<a name="179245091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179245091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179245091">(Oct 28 2019 at 16:00)</a>:</h4>
<p>Is there a reason not to do both in one shot? I guess it doesn't save that much work. I'll get started on this.</p>



<a name="179301715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179301715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179301715">(Oct 29 2019 at 05:30)</a>:</h4>
<p>I trired out porting the existing queries to use only the new checker and promotion stuff, removing <code>qualify_consts</code> entirely.</p>
<p><a href="https://github.com/rust-lang/rust/compare/master...ecstatic-morse:new-qualify-consts" target="_blank" title="https://github.com/rust-lang/rust/compare/master...ecstatic-morse:new-qualify-consts">https://github.com/rust-lang/rust/compare/master...ecstatic-morse:new-qualify-consts</a></p>
<p>The first 7 commits stand on their own and just do the promotion part. It's pretty hacky at the moment, especially in <code>promote_consts</code> where it errors when promotion fails for <code>rustc_args_required_const</code>. I'll polish it up tomorrow and open a draft PR.</p>



<a name="179301743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179301743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179301743">(Oct 29 2019 at 05:31)</a>:</h4>
<p>I'm pretty exhausted, so maybe ignore this until I can do a bit of work on it tomorrow <span aria-label="smile" class="emoji emoji-263a" role="img" title="smile">:smile:</span></p>



<a name="179359461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Removing%20old%20const%20checker/qualifier/near/179359461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Removing.20old.20const.20checker.2Fqualifier.html#179359461">(Oct 29 2019 at 18:28)</a>:</h4>
<p>Okay, <a href="https://github.com/rust-lang/rust/issues/65942" target="_blank" title="https://github.com/rust-lang/rust/issues/65942">#65942</a> is up and actually in a mergeable state. I'll rebase the switch to the new const checker on top of that instead.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>